package cn.edu.bjfu.practice.practice.app.common.response;

/**
 * 来自用户的错误码。请将所有与用户操作错误添加在此
 */
public class ErrorFromUser extends ErrorCode {
    public final String PREFIX = "A";

    public static final ErrorFromUser USER_PASS_ERROR = new ErrorFromUser(1, "用户名或密码错误");
    public static final ErrorFromUser PROJECT_DEL_ERROR = new ErrorFromUser(2, "项目已有小组选择，不可删除");
    public static final ErrorFromUser TEAM_DEL_ERROR = new ErrorFromUser(3, "项目已有学生选择，不可删除");
    public static final ErrorFromUser PASSWORD_WRONG = new ErrorFromUser(4, "原密码有误");
    public static final ErrorFromUser NOT_LOGIN = new ErrorFromUser(5, "用户未登录");
    public static final ErrorFromUser FILE_READ_ERROR = new ErrorFromUser(6, "文件读取错误");
    public static final ErrorFromUser JOINED_ERROR = new ErrorFromUser(7, "用户已有加入的小组");
    public static final ErrorFromUser NO_RIGHT_ERROR = new ErrorFromUser(7, "用户无权限");

    public ErrorFromUser(int code, String message) {
        super(code, message);
    }

    @Override
    public String toString() {
        return PREFIX + super.toString();
    }
}


